//
//  DBAccesor.m
//  Exchange
//
//  Created by Александр Лазарекно on 12.12.12.
//  Copyright (c) 2012 Бонч. All rights reserved.
//

#import "DBAccesor.h"
#import "Utility.h"

@implementation DBAccesor
+(void) insertFolders:(Folder*) folderDB
{
   
    
    FMDatabase *db = [FMDatabase databaseWithPath:[Utility getDatabasePath]];
    if (![db open]) {
        NSLog(@"Could not open db.");
    }
    [db executeUpdate:@"INSERT INTO folders (display_name,folder_id,parent_folder_id) VALUES (?,?,?);",
     folderDB.displayName,folderDB.folderID,folderDB.parentFolderID];
    [db close];

}

@end
